<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class Bundler::CLI::Outdated - bundler: Ruby Standard Library Documentation</title>


<script src="../../js/navigation.js" defer></script>
<script src="../../js/search.js" defer></script>
<script src="../../js/search_index.js" defer></script>
<script src="../../js/searcher.js" defer></script>
<script src="../../js/darkfish.js" defer></script>

<script src="../../js/jquery-3.2.0.min.js"></script>

<script src="../../js/vue.min.js"></script>
<script src="../../js/js.cookie.min.js"></script>

<link href="../../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../../css/rdoc.css" rel="stylesheet">
<link href="../../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../../";
  var index_rel_prefix = "../../";
  var darkModeCsseHref = "../../css/rdoc-dm.css"
  var defaultModeCssHref = "../../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../../table_of_contents.html#pages">Pages</a>
    <a href="../../table_of_contents.html#classes">Classes</a>
    <a href="../../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="../../Object.html">Object</a>
</div>

        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-new">::new</a>
    <li ><a href="#method-i-check_for_deployment_mode-21">#check_for_deployment_mode!</a>
    <li ><a href="#method-i-gem_column_for">#gem_column_for</a>
    <li ><a href="#method-i-get_version_semver_portion_value">#get_version_semver_portion_value</a>
    <li ><a href="#method-i-groups_text">#groups_text</a>
    <li ><a href="#method-i-justify">#justify</a>
    <li ><a href="#method-i-loaded_from_for">#loaded_from_for</a>
    <li ><a href="#method-i-nothing_outdated_message">#nothing_outdated_message</a>
    <li ><a href="#method-i-print_gem">#print_gem</a>
    <li ><a href="#method-i-print_gems">#print_gems</a>
    <li ><a href="#method-i-print_gems_table">#print_gems_table</a>
    <li ><a href="#method-i-print_indented">#print_indented</a>
    <li ><a href="#method-i-retrieve_active_spec">#retrieve_active_spec</a>
    <li ><a href="#method-i-run">#run</a>
    <li ><a href="#method-i-table_header">#table_header</a>
    <li ><a href="#method-i-update_present_via_semver_portions">#update_present_via_semver_portions</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-Bundler::CLI::Outdated">
    <h1 id="class-Bundler::CLI::Outdated" class="class">
      class Bundler::CLI::Outdated
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">



        <section class="attribute-method-details" class="method-section">
        <header>
        <h3>Attributes</h3>
        </header>

          <div id="attribute-i-filter_options_patch" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">filter_options_patch</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-gems" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">gems</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-options" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">options</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-options_include_groups" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">options_include_groups</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-outdated_gems" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">outdated_gems</span><span
                class="attribute-access-type">[RW]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-sources" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">sources</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-strict" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">strict</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
            </section>


                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">(options, gems)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 8</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">options</span>, <span class="ruby-identifier">gems</span>)
  <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
  <span class="ruby-ivar">@gems</span> = <span class="ruby-identifier">gems</span>
  <span class="ruby-ivar">@sources</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value">:source</span>])

  <span class="ruby-ivar">@filter_options_patch</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">keys</span> <span class="ruby-operator">&amp;</span> <span class="ruby-node">%w[filter-major filter-minor filter-patch]</span>

  <span class="ruby-ivar">@outdated_gems</span> = []

  <span class="ruby-ivar">@options_include_groups</span> = [<span class="ruby-value">:group</span>, <span class="ruby-value">:groups</span>].<span class="ruby-identifier">any?</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">options</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_s</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment"># the patch level options imply strict is also true. It wouldn&#39;t make</span>
  <span class="ruby-comment"># sense otherwise.</span>
  <span class="ruby-ivar">@strict</span> = <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;filter-strict&quot;</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">CLI</span><span class="ruby-operator">::</span><span class="ruby-constant">Common</span>.<span class="ruby-identifier">patch_level_options</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">any?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-run" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">run</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="run-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 26</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">run</span>
  <span class="ruby-identifier">check_for_deployment_mode!</span>

  <span class="ruby-identifier">gems</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">gem_name</span><span class="ruby-operator">|</span>
    <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">CLI</span><span class="ruby-operator">::</span><span class="ruby-constant">Common</span>.<span class="ruby-identifier">select_spec</span>(<span class="ruby-identifier">gem_name</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>.<span class="ruby-identifier">validate_runtime!</span>
  <span class="ruby-identifier">current_specs</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">silence</span> { <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>.<span class="ruby-identifier">resolve</span> }

  <span class="ruby-identifier">current_dependencies</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">silence</span> <span class="ruby-keyword">do</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">dep</span><span class="ruby-operator">|</span> [<span class="ruby-identifier">dep</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">dep</span>] }.<span class="ruby-identifier">to_h</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">definition</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">gems</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">sources</span>.<span class="ruby-identifier">empty?</span>
    <span class="ruby-comment"># We&#39;re doing a full update</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>(<span class="ruby-keyword">true</span>)
  <span class="ruby-keyword">else</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>(<span class="ruby-value">:gems</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">gems</span>, <span class="ruby-value">:sources</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">sources</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">CLI</span><span class="ruby-operator">::</span><span class="ruby-constant">Common</span>.<span class="ruby-identifier">configure_gem_version_promoter</span>(
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>,
    <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-value">:strict</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-ivar">@strict</span>)
  )

  <span class="ruby-identifier">definition_resolution</span> = <span class="ruby-identifier">proc</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">options</span>[<span class="ruby-value">:local</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">definition</span>.<span class="ruby-identifier">resolve_with_cache!</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">definition</span>.<span class="ruby-identifier">resolve_remotely!</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:parseable</span>]
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">silence</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">definition_resolution</span>)
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">definition_resolution</span>.<span class="ruby-identifier">call</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-string">&quot;&quot;</span>

  <span class="ruby-comment"># Loop through the current specs</span>
  <span class="ruby-identifier">gemfile_specs</span>, <span class="ruby-identifier">dependency_specs</span> = <span class="ruby-identifier">current_specs</span>.<span class="ruby-identifier">partition</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">current_dependencies</span>.<span class="ruby-identifier">key?</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">specs</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;only-explicit&quot;</span>]
    <span class="ruby-identifier">gemfile_specs</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">gemfile_specs</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">dependency_specs</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">sort_by</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:name</span>).<span class="ruby-identifier">uniq</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:name</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">current_spec</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">gems</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">gems</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">current_spec</span>.<span class="ruby-identifier">name</span>)

    <span class="ruby-identifier">active_spec</span> = <span class="ruby-identifier">retrieve_active_spec</span>(<span class="ruby-identifier">definition</span>, <span class="ruby-identifier">current_spec</span>)
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">active_spec</span>

    <span class="ruby-keyword">next</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">filter_options_patch</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">update_present_via_semver_portions</span>(<span class="ruby-identifier">current_spec</span>, <span class="ruby-identifier">active_spec</span>, <span class="ruby-identifier">options</span>)

    <span class="ruby-identifier">gem_outdated</span> = <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">active_spec</span>.<span class="ruby-identifier">version</span>) <span class="ruby-operator">&gt;</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Version</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">current_spec</span>.<span class="ruby-identifier">version</span>)
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">gem_outdated</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">current_spec</span>.<span class="ruby-identifier">git_version</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">active_spec</span>.<span class="ruby-identifier">git_version</span>)

    <span class="ruby-identifier">dependency</span> = <span class="ruby-identifier">current_dependencies</span>[<span class="ruby-identifier">current_spec</span>.<span class="ruby-identifier">name</span>]
    <span class="ruby-identifier">groups</span> = <span class="ruby-string">&quot;&quot;</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">dependency</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value">:parseable</span>]
      <span class="ruby-identifier">groups</span> = <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">groups</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;, &quot;</span>)
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">outdated_gems</span> <span class="ruby-operator">&lt;&lt;</span> {
      <span class="ruby-value">:active_spec</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">active_spec</span>,
      <span class="ruby-value">:current_spec</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">current_spec</span>,
      <span class="ruby-value">:dependency</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">dependency</span>,
      <span class="ruby-value">:groups</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">groups</span>,
    }
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">outdated_gems</span>.<span class="ruby-identifier">empty?</span>
    <span class="ruby-keyword">unless</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:parseable</span>]
      <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span>(<span class="ruby-identifier">nothing_outdated_message</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">options_include_groups</span>
      <span class="ruby-identifier">relevant_outdated_gems</span> = <span class="ruby-identifier">outdated_gems</span>.<span class="ruby-identifier">group_by</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">g</span><span class="ruby-operator">|</span> <span class="ruby-identifier">g</span>[<span class="ruby-value">:groups</span>] }.<span class="ruby-identifier">sort</span>.<span class="ruby-identifier">flat_map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">groups</span>, <span class="ruby-identifier">gems</span><span class="ruby-operator">|</span>
        <span class="ruby-identifier">contains_group</span> = <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;, &quot;</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value">:group</span>])
        <span class="ruby-keyword">next</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:groups</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">contains_group</span>

        <span class="ruby-identifier">gems</span>
      <span class="ruby-keyword">end</span>.<span class="ruby-identifier">compact</span>

      <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:parseable</span>]
        <span class="ruby-identifier">print_gems</span>(<span class="ruby-identifier">relevant_outdated_gems</span>)
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">print_gems_table</span>(<span class="ruby-identifier">relevant_outdated_gems</span>)
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:parseable</span>]
      <span class="ruby-identifier">print_gems</span>(<span class="ruby-identifier">outdated_gems</span>)
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">print_gems_table</span>(<span class="ruby-identifier">outdated_gems</span>)
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Instance Methods</h3>
                </header>

                  <div id="method-i-check_for_deployment_mode-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">check_for_deployment_mode!</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="check_for_deployment_mode-21-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 225</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">check_for_deployment_mode!</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">frozen_bundle?</span>
  <span class="ruby-identifier">suggested_command</span> = <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">locations</span>(<span class="ruby-string">&quot;frozen&quot;</span>).<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">&amp;</span>([<span class="ruby-value">:global</span>, <span class="ruby-value">:local</span>]).<span class="ruby-identifier">any?</span>
    <span class="ruby-string">&quot;bundle config unset frozen&quot;</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">locations</span>(<span class="ruby-string">&quot;deployment&quot;</span>).<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">&amp;</span>([<span class="ruby-value">:global</span>, <span class="ruby-value">:local</span>]).<span class="ruby-identifier">any?</span>
    <span class="ruby-string">&quot;bundle config unset deployment&quot;</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">raise</span> <span class="ruby-constant">ProductionError</span>, <span class="ruby-string">&quot;You are trying to check outdated gems in &quot;</span> \
    <span class="ruby-string">&quot;deployment mode. Run `bundle outdated` elsewhere.\n&quot;</span> \
    <span class="ruby-string">&quot;\nIf this is a development machine, remove the &quot;</span> \
    <span class="ruby-node">&quot;#{Bundler.default_gemfile} freeze&quot;</span> \
    <span class="ruby-node">&quot;\nby running `#{suggested_command}`.&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-gem_column_for" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">gem_column_for</span><span
                                class="method-args">(current_spec, active_spec, dependency, groups)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="gem_column_for-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 215</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">gem_column_for</span>(<span class="ruby-identifier">current_spec</span>, <span class="ruby-identifier">active_spec</span>, <span class="ruby-identifier">dependency</span>, <span class="ruby-identifier">groups</span>)
  <span class="ruby-identifier">current_version</span> = <span class="ruby-node">&quot;#{current_spec.version}#{current_spec.git_version}&quot;</span>
  <span class="ruby-identifier">spec_version</span> = <span class="ruby-node">&quot;#{active_spec.version}#{active_spec.git_version}&quot;</span>
  <span class="ruby-identifier">dependency</span> = <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">requirement</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">dependency</span>

  <span class="ruby-identifier">ret_val</span> = [<span class="ruby-identifier">active_spec</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">current_version</span>, <span class="ruby-identifier">spec_version</span>, <span class="ruby-identifier">dependency</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">to_s</span>]
  <span class="ruby-identifier">ret_val</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">loaded_from_for</span>(<span class="ruby-identifier">active_spec</span>).<span class="ruby-identifier">to_s</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug?</span>
  <span class="ruby-identifier">ret_val</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-get_version_semver_portion_value" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">get_version_semver_portion_value</span><span
                                class="method-args">(spec, version_portion_index)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="get_version_semver_portion_value-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 263</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_version_semver_portion_value</span>(<span class="ruby-identifier">spec</span>, <span class="ruby-identifier">version_portion_index</span>)
  <span class="ruby-identifier">version_section</span> = <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">segments</span>[<span class="ruby-identifier">version_portion_index</span>, <span class="ruby-value">1</span>]
  <span class="ruby-identifier">version_section</span>.<span class="ruby-identifier">to_a</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">to_i</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-groups_text" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">groups_text</span><span
                                class="method-args">(group_text, groups)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="groups_text-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 136</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">groups_text</span>(<span class="ruby-identifier">group_text</span>, <span class="ruby-identifier">groups</span>)
  <span class="ruby-node">&quot;#{group_text}#{groups.split(&quot;,&quot;).size &gt; 1 ? &quot;s&quot; : &quot;&quot;} \&quot;#{groups}\&quot;&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-justify" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">justify</span><span
                                class="method-args">(row, sizes)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="justify-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 291</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">justify</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">sizes</span>)
  <span class="ruby-identifier">row</span>.<span class="ruby-identifier">each_with_index</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">element</span>, <span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">element</span>.<span class="ruby-identifier">ljust</span>(<span class="ruby-identifier">sizes</span>[<span class="ruby-identifier">index</span>])
  <span class="ruby-keyword">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;  &quot;</span>).<span class="ruby-identifier">strip</span> <span class="ruby-operator">+</span> <span class="ruby-string">&quot;\n&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-loaded_from_for" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">loaded_from_for</span><span
                                class="method-args">(spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="loaded_from_for-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 130</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">loaded_from_for</span>(<span class="ruby-identifier">spec</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:loaded_from</span>)

  <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">loaded_from</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-nothing_outdated_message" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">nothing_outdated_message</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="nothing_outdated_message-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 140</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">nothing_outdated_message</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">filter_options_patch</span>.<span class="ruby-identifier">any?</span>
    <span class="ruby-identifier">display</span> = <span class="ruby-identifier">filter_options_patch</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">o</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-string">&quot;filter-&quot;</span>, <span class="ruby-string">&quot;&quot;</span>)
    <span class="ruby-keyword">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot; or &quot;</span>)

    <span class="ruby-node">&quot;No #{display} updates to display.\n&quot;</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-string">&quot;Bundle up to date!\n&quot;</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-print_gem" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">print_gem</span><span
                                class="method-args">(current_spec, active_spec, dependency, groups)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="print_gem-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 189</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print_gem</span>(<span class="ruby-identifier">current_spec</span>, <span class="ruby-identifier">active_spec</span>, <span class="ruby-identifier">dependency</span>, <span class="ruby-identifier">groups</span>)
  <span class="ruby-identifier">spec_version</span> = <span class="ruby-node">&quot;#{active_spec.version}#{active_spec.git_version}&quot;</span>
  <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug?</span>
    <span class="ruby-identifier">loaded_from</span> = <span class="ruby-identifier">loaded_from_for</span>(<span class="ruby-identifier">active_spec</span>)
    <span class="ruby-identifier">spec_version</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot; (from #{loaded_from})&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">loaded_from</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">current_version</span> = <span class="ruby-node">&quot;#{current_spec.version}#{current_spec.git_version}&quot;</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">dependency</span>&amp;.<span class="ruby-identifier">specific?</span>
    <span class="ruby-identifier">dependency_version</span> = <span class="ruby-node">%(, requested #{dependency.requirement})</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">spec_outdated_info</span> = <span class="ruby-node">&quot;#{active_spec.name} (newest #{spec_version}, &quot;</span> \
    <span class="ruby-node">&quot;installed #{current_version}#{dependency_version})&quot;</span>

  <span class="ruby-identifier">output_message</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:parseable</span>]
    <span class="ruby-identifier">spec_outdated_info</span>.<span class="ruby-identifier">to_s</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">options_include_groups</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">groups</span>.<span class="ruby-identifier">empty?</span>
    <span class="ruby-node">&quot;  * #{spec_outdated_info}&quot;</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-node">&quot;  * #{spec_outdated_info} in #{groups_text(&quot;group&quot;, groups)}&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">output_message</span>.<span class="ruby-identifier">rstrip</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-print_gems" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">print_gems</span><span
                                class="method-args">(gems_list)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="print_gems-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 165</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print_gems</span>(<span class="ruby-identifier">gems_list</span>)
  <span class="ruby-identifier">gems_list</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">gem</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">print_gem</span>(
      <span class="ruby-identifier">gem</span>[<span class="ruby-value">:current_spec</span>],
      <span class="ruby-identifier">gem</span>[<span class="ruby-value">:active_spec</span>],
      <span class="ruby-identifier">gem</span>[<span class="ruby-value">:dependency</span>],
      <span class="ruby-identifier">gem</span>[<span class="ruby-value">:groups</span>],
    )
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-print_gems_table" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">print_gems_table</span><span
                                class="method-args">(gems_list)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="print_gems_table-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 176</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print_gems_table</span>(<span class="ruby-identifier">gems_list</span>)
  <span class="ruby-identifier">data</span> = <span class="ruby-identifier">gems_list</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">gem</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">gem_column_for</span>(
      <span class="ruby-identifier">gem</span>[<span class="ruby-value">:current_spec</span>],
      <span class="ruby-identifier">gem</span>[<span class="ruby-value">:active_spec</span>],
      <span class="ruby-identifier">gem</span>[<span class="ruby-value">:dependency</span>],
      <span class="ruby-identifier">gem</span>[<span class="ruby-value">:groups</span>],
    )
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">print_indented</span>([<span class="ruby-identifier">table_header</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">data</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-print_indented" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">print_indented</span><span
                                class="method-args">(matrix)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="print_indented-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 268</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print_indented</span>(<span class="ruby-identifier">matrix</span>)
  <span class="ruby-identifier">header</span> = <span class="ruby-identifier">matrix</span>[<span class="ruby-value">0</span>]
  <span class="ruby-identifier">data</span> = <span class="ruby-identifier">matrix</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]

  <span class="ruby-identifier">column_sizes</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">header</span>.<span class="ruby-identifier">size</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">matrix</span>.<span class="ruby-identifier">max_by</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span> <span class="ruby-identifier">row</span>[<span class="ruby-identifier">index</span>].<span class="ruby-identifier">length</span> }[<span class="ruby-identifier">index</span>].<span class="ruby-identifier">length</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">justify</span>(<span class="ruby-identifier">header</span>, <span class="ruby-identifier">column_sizes</span>)

  <span class="ruby-identifier">data</span>.<span class="ruby-identifier">sort_by!</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span> <span class="ruby-identifier">row</span>[<span class="ruby-value">0</span>] }

  <span class="ruby-identifier">data</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span> <span class="ruby-identifier">justify</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">column_sizes</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-retrieve_active_spec" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">retrieve_active_spec</span><span
                                class="method-args">(definition, current_spec)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="retrieve_active_spec-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 152</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">retrieve_active_spec</span>(<span class="ruby-identifier">definition</span>, <span class="ruby-identifier">current_spec</span>)
  <span class="ruby-identifier">active_spec</span> = <span class="ruby-identifier">definition</span>.<span class="ruby-identifier">resolve</span>.<span class="ruby-identifier">find_by_name_and_platform</span>(<span class="ruby-identifier">current_spec</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">current_spec</span>.<span class="ruby-identifier">platform</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">active_spec</span>

  <span class="ruby-keyword">return</span> <span class="ruby-identifier">active_spec</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">strict</span>

  <span class="ruby-identifier">active_specs</span> = <span class="ruby-identifier">active_spec</span>.<span class="ruby-identifier">source</span>.<span class="ruby-identifier">specs</span>.<span class="ruby-identifier">search</span>(<span class="ruby-identifier">current_spec</span>.<span class="ruby-identifier">name</span>).<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">spec</span><span class="ruby-operator">|</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">match_platform</span>(<span class="ruby-identifier">current_spec</span>.<span class="ruby-identifier">platform</span>) }.<span class="ruby-identifier">sort_by</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:version</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">current_spec</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">prerelease?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value">:pre</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">active_specs</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
    <span class="ruby-identifier">active_specs</span>.<span class="ruby-identifier">delete_if</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:version</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">prerelease?</span> }
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">active_specs</span>.<span class="ruby-identifier">last</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-table_header" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">table_header</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="table_header-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 285</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">table_header</span>
  <span class="ruby-identifier">header</span> = [<span class="ruby-string">&quot;Gem&quot;</span>, <span class="ruby-string">&quot;Current&quot;</span>, <span class="ruby-string">&quot;Latest&quot;</span>, <span class="ruby-string">&quot;Requested&quot;</span>, <span class="ruby-string">&quot;Groups&quot;</span>]
  <span class="ruby-identifier">header</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;Path&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">debug?</span>
  <span class="ruby-identifier">header</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-update_present_via_semver_portions" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">update_present_via_semver_portions</span><span
                                class="method-args">(current_spec, active_spec, options)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="update_present_via_semver_portions-source">
            <pre><span class="ruby-comment"># File bundler/cli/outdated.rb, line 239</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">update_present_via_semver_portions</span>(<span class="ruby-identifier">current_spec</span>, <span class="ruby-identifier">active_spec</span>, <span class="ruby-identifier">options</span>)
  <span class="ruby-identifier">current_major</span> = <span class="ruby-identifier">current_spec</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">segments</span>.<span class="ruby-identifier">first</span>
  <span class="ruby-identifier">active_major</span> = <span class="ruby-identifier">active_spec</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">segments</span>.<span class="ruby-identifier">first</span>

  <span class="ruby-identifier">update_present</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-identifier">update_present</span> = <span class="ruby-identifier">active_major</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">current_major</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;filter-major&quot;</span>]

  <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">update_present</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;filter-minor&quot;</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;filter-patch&quot;</span>]) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">current_major</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">active_major</span>
    <span class="ruby-identifier">current_minor</span> = <span class="ruby-identifier">get_version_semver_portion_value</span>(<span class="ruby-identifier">current_spec</span>, <span class="ruby-value">1</span>)
    <span class="ruby-identifier">active_minor</span> = <span class="ruby-identifier">get_version_semver_portion_value</span>(<span class="ruby-identifier">active_spec</span>, <span class="ruby-value">1</span>)

    <span class="ruby-identifier">update_present</span> = <span class="ruby-identifier">active_minor</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">current_minor</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;filter-minor&quot;</span>]

    <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">update_present</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;filter-patch&quot;</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">current_minor</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">active_minor</span>
      <span class="ruby-identifier">current_patch</span> = <span class="ruby-identifier">get_version_semver_portion_value</span>(<span class="ruby-identifier">current_spec</span>, <span class="ruby-value">2</span>)
      <span class="ruby-identifier">active_patch</span> = <span class="ruby-identifier">get_version_semver_portion_value</span>(<span class="ruby-identifier">active_spec</span>, <span class="ruby-value">2</span>)

      <span class="ruby-identifier">update_present</span> = <span class="ruby-identifier">active_patch</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">current_patch</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">update_present</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>.</p><p><a href="https://jamesbritt.bandcamp.com/">Maximum R+D</a>.  </p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

